package com.wzt.greenhouse.model;

import java.util.ArrayList;
import java.util.List;


public class MonitorBox {
	List<MonitorInfo> MonitorInfos;
	private String name;
	private String mainNo;
	private String subNo;
	private String wdString ="";
	private String sdString ="";
	private String trwdString = "";
	private String trsdString = "";
	private String gzdString = "";
	private String co2string = "";
	private String id = "";
	
	public String getWdString() {
		return wdString;
	}
	
	public String getSdString() {
		return sdString;
	}
	
	public String getTrwdString() {
		return trwdString;
	}
	
	public String getTrsdString() {
		return trsdString;
	}
	
	public String getGzdString() {
		return gzdString;
	}
	
	public String getCo2string() {
		return co2string;
	}
	
	public void setWdString(String wdString) {
		this.wdString = wdString;
	}
	
	public void setSdString(String sdString) {
		this.sdString = sdString;
	}
	
	public void setTrwdString(String trwdString) {
		this.trwdString = trwdString;
	}
	
	public void setTrsdString(String trsdString) {
		this.trsdString = trsdString;
	}
	
	public void setGzdString(String gzdString) {
		this.gzdString = gzdString;
	}
	
	public void setCo2string(String co2string) {
		this.co2string = co2string;
	}
	
	public void setMainNo(String mainNo) {
		this.mainNo = mainNo;
	}

	public String getMainNo() {
		return mainNo;
	}
	
	public void setSubNo(String subNo) {
		this.subNo = subNo;
	}
	
	public String getSubNo() {
		return subNo;
	}
	
	public MonitorBox(String strName,String id)
	{
		MonitorInfos = new ArrayList<MonitorInfo>();
		this.id = id;
		name = strName;
	}
	
	public void AddMonitor(MonitorInfo info)
	{
		MonitorInfos.add(info);
	}
	
	public int getSize()
	{
		return MonitorInfos.size();
	}
	
	public MonitorInfo GetInfoForIndex(int index)
	{
		return MonitorInfos.get(index);
	}
	
	public String getName()
	{
		return name;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getId() {
		return id;
	}
	
	public MonitorInfo getMonitorInfoById(String id)
	{
		for (int i = 0; i < MonitorInfos.size(); i++) {
			MonitorInfo info = MonitorInfos.get(i);
			if(info.getId().equals(id))
			{
				return info;
			}
		}
		return null;
	}
}
